package banksimulator.bank;

/**
 * 当帐户的余额少于要取的数额时，由AbstractAccount子类的某个对象的抛出。
 * @see AbstractAccount
 * @author Rajab
 */
public class FundsInsufficientException extends Exception {

    /**
     * 构造一个FundsInsufficientException。
     * @param balance 帐户余额
     * @param withdrawAmount  要取出的金额
     */
    public FundsInsufficientException(double balance, double withdrawAmount) {
        super(String.format("你的取钱金额: %.2f 超过余额: %.2f", withdrawAmount, balance));
    }
}
